package com.task.submitter;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;

public enum TaskEnum {

	FLUX("/submit/voltagetask"), MEMBRANE("/submit/membranetask"), ROTATE("/task/image/rotate/submit"), FLIP("/task/image/flip/submit"), LUCKY("/task/image/lucky/submit");
	
	private String value;
	
	private TaskEnum(String value){
		this.value = value;
	}

	public String getValue() {
		return value;
	}
	
	private static final List<TaskEnum> VALUES = Collections.unmodifiableList(Arrays.asList(values()));
	private static final int SIZE = VALUES.size();
	private static final Random RANDOM = new Random();

	public static TaskEnum randomTask()  {
		return VALUES.get(RANDOM.nextInt(SIZE));
	}
	
}
